package calculator.operator;


public class SubtractOperator implements Operator {

    public double doCal(double num1, double num2) {
        return fix(num2).subtract(fix(num1)).doubleValue();
    }

    public int getPriority() {
        return Priority.PRIORITY_LOWER;
    }

    @Override
    public boolean support(char c) {
        return c == '-';
    }

    @Override
    public String toString() {
        return "-";
    }
}
